package abacab.router;

import com.typesafe.config.Config;
import com.typesafe.config.ConfigException;

/**
 * Represents a factory for building router instances
 * 
 * @param <M>
 *          the type of messages handled by the router
 */
public interface RouterFactory<M> {
	/**
	 * @param config
	 *          the configuration
	 * @return the router
	 * @throws ConfigException
	 *           if the configuration is invalid
	 */
	Router<M> buildRouter(Config config) throws ConfigException;
}